package com.cdtye.itps.cms.dao.device.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.cdtye.common.webcore.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 接触网关键设备表
 * @author nz
 * @date 2021-08-20
 */
@ApiModel("接触网关键设备表")
@Data
@Accessors(chain = true)
@TableName("JCW_DEVICE")
public class JcwDevice {
    
    @ApiModelProperty(value = "设备ID")
    @TableId(value = "DEVICE_ID", type = IdType.ASSIGN_UUID)
    private String deviceId;

    @ApiModelProperty(value = "设备分类ID")
    private String deviceClassId;

    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "设备编号")
    private String deviceNo;

    @ApiModelProperty(value = "使用状态 0使用(在线) 1停用(报废)")
    private String usingStatus;

    @ApiModelProperty(value = "度量单位  数据字典200002")
    private String unitType;

    @ApiModelProperty(value = "数量")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DOUBLE)
    private Double quantity;

    @ApiModelProperty(value = "规格")
    private String sepcs;

    @ApiModelProperty(value = "型号")
    private String models;

    @ApiModelProperty(value = "有效期")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DOUBLE)
    private Double serviceTerm;

    @ApiModelProperty(value = "物料编号")
    private String materialNo;

    @ApiModelProperty(value = "投入使用日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DATE)
    private Date runDate;

    @ApiModelProperty(value = "生产日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DATE)
    private Date mfrsDate;

    @ApiModelProperty(value = "生产厂家")
    private String mfrs;

    @ApiModelProperty(value = "厂家设备号")
    private String mfrsSerialNo;

    @ApiModelProperty(value = "厂家批次号")
    private String mfrsLotNo;

    @ApiModelProperty(value = "经度")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DOUBLE)
    private Double longitude;

    @ApiModelProperty(value = "纬度")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DOUBLE)
    private Double latitude;

    @ApiModelProperty(value = "起始公里标")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DOUBLE)
    private Double beginRoad;

    @ApiModelProperty(value = "截止公里标")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.DOUBLE)
    private Double endRoad;

    @ApiModelProperty(value = "设备包保人名称，以，分隔")
    private String contractorname;

    @ApiModelProperty(value = "设备包保人编码，以，分隔")
    private String contractorcode;

    @ApiModelProperty(value = "最近一次检修日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    private Date lastOverhaulDate;

    @ApiModelProperty(value = "最近一次检测日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    private Date lastDetectDate;

    @ApiModelProperty(value = "最近一次巡视日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    private Date lastInspectionDate;

    @ApiModelProperty(value = "安装地址")
    private String installLoc;

    @ApiModelProperty(value = "变电所")
    private String bdName;

    @ApiModelProperty(value = "用途")
    private String usingPurpose;

    @ApiModelProperty(value = "备注信息")
    private String memo;

    @ApiModelProperty(value = "段辖线路")
    private String seclineId;

    @ApiModelProperty(value = "股道")
    private String trackId;

    @ApiModelProperty(value = "隧道")
    private String tunnelId;

    @ApiModelProperty(value = "行别")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR)
    private String directionId;

    @ApiModelProperty(value = "区间站场")
    private String siteId;

    @ApiModelProperty(value = "结束区间站场")
    private String endSiteId;

    @ApiModelProperty(value = "删除状态0使用 1删除 2、停用")
    private String deleteStatus;

    @ApiModelProperty(value = "所属工区")
    private String deptId;

    private Long overhaulPeriod;

    private Long detectPeriod;

    private Long inspectionPeriod;

    @ApiModelProperty(value = "检修周期id")
    private String repairPeriodConfigId;

    @ApiModelProperty(value = "检测周期id")
    private String detectPeriodConfigId;

    @ApiModelProperty(value = "巡视周期id")
    private String inspectionPeriodConfigId;

    @ApiModelProperty(value = "是否审核 Y已审核, N未审核")
    private String isAudit;

    @ApiModelProperty(value = "设备对应支柱号文本")
    private String pillarNumText;

    @ApiModelProperty(value = "上次检修日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    private Date preOverhaulDate;

    @ApiModelProperty(value = "上次检测日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)

    private Date preDetectDate;

    @ApiModelProperty(value = "上次巡视日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    private Date preInspectionDate;

    @ApiModelProperty(value = "最近一次检修人")
    private String lastOverhaulPerson;

    @ApiModelProperty(value = "最近一次检测人")
    private String lastDetectPerson;

    @ApiModelProperty(value = "最近一次巡视人")
    private String lastInspectionPerson;

    @ApiModelProperty(value = "上上次检修人")
    private String preOverhaulPerson;

    @ApiModelProperty(value = "上上次检测人")
    private String preDetectPerson;

    @ApiModelProperty(value = "上上次巡视人")
    private String preInspectionPerson;

    @ApiModelProperty(value = "开始支柱号")
    private String startPillarNum;

    @ApiModelProperty(value = "结束支柱号")
    private String endPillarNum;

    @ApiModelProperty("创建时间")
    @TableField(value ="CREATE_DATETIME", fill = FieldFill.INSERT)
    private Date createDatetime;

    @ApiModelProperty("更新时间")
    @TableField(value ="UPDATE_DATETIME",fill = FieldFill.INSERT_UPDATE)
    private Date updateDatetime;

    @ApiModelProperty("创建人")
    @TableField(value ="CREATE_BY", fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty("更新人")
    @TableField(value ="UPDATE_BY",fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "台账预警配置id")
    @TableField(updateStrategy= FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR)
    private String warnConfigId;

    @ApiModelProperty(value = "锚段号")
    private String anchorNoImport;

    @ApiModelProperty(value = "长度")
    private Float length;

}